<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/sys/include/taglib.jsp"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>添加报修工单</title>
<%@ include file="/WEB-INF/sys/include/css.jsp"%>
</head>
<body>
<form id="form" action="${path}/repairOrders/save.json" method="post">
<div class="form">
	<div class="group">
		<div class="label">*报单流水号:</div>
		<div class="item"><input type="text" name="serialNumber" id="serialNumber" /></div>
	</div>
	<div class="group">
		<div class="label">报单日期:</div>
		<div class="item"><input type="text" name="repairTime" id="repairTime" ltype="date" /></div>
	</div>
	<div class="group">
		<div class="label">报单方式:</div>
		<div class="item">
			<select id="repairType" name="repairType">
			<option value="0">微信</option>
			<option value="1">来电</option>
			</select>
		</div>
	</div>
	<div class="group">
		<div class="label">内容:</div>
		<div class="item"><input type="text" name="contents" id="contents" /></div>
	</div>
	<div class="group">
		<div class="label">房间编号:</div>
		<div class="item"><input type="text" name="roomCode" id="roomCode" /></div>
	</div>
	<div class="group">
		<div class="label">派工状态:</div>
		<div class="item">
			<input type="radio" id="dispatchStatus0" name="dispatchStatus" value="0" checked="checked" /><label for="dispatchStatus0" class="label">否</label>
			<input type="radio" id="dispatchStatus1" name="dispatchStatus" value="1" /><label for="dispatchStatus1" class="label">是</label>
		</div>
	</div>
	<div class="group">
		<div class="label">完工状态:</div>
		<div class="item">
			<input type="radio" id="completionStatus0" name="completionStatus" value="0" checked="checked" /><label for="completionStatus0" class="label">否</label>
			<input type="radio" id="completionStatus1" name="completionStatus" value="1" /><label for="completionStatus1" class="label">是</label>
		</div>
	</div>
	<div class="group">
		<div class="label">回访状态:</div>
		<div class="item">
			<input type="radio" id="returnVisitsStatus0" name="returnVisitsStatus" value="0" checked="checked" /><label for="returnVisitsStatus0" class="label">否</label>
			<input type="radio" id="returnVisitsStatus1" name="returnVisitsStatus" value="1" /><label for="returnVisitsStatus1" class="label">是</label>
		</div>
	</div>
	<div class="group">
		<div class="label">联系人:</div>
		<div class="item"><input type="text" name="linkman" id="linkman" /></div>
	</div>
	<div class="group">
		<div class="label">联系电话:</div>
		<div class="item"><input type="text" name="linkphone" id="linkphone" /></div>
	</div>
	<div class="group">
		<div class="label">预约时间:</div>
		<div class="item"><input type="text" name="appointmentTime" id="appointmentTime" ltype="date" /></div>
	</div>
	<div class="group">
		<div class="label">维修类别:</div>
		<div class="item"><input type="text" name="maintainKind" id="maintainKind" /></div>
	</div>
	<div class="group">
		<div class="label">客户类别:</div>
		<div class="item">
			<input type="radio" id="customKind0" name="customKind" value="0" checked="checked" /><label for="customKind0" class="label">个人</label>
			<input type="radio" id="customKind1" name="customKind" value="1" /><label for="customKind1" class="label">公共</label>
		</div>
	</div>
	<div class="group">
		<div class="label">二次维修:</div>
		<div class="item">
			<input type="radio" id="secondaryMaintain0" name="secondaryMaintain" value="0" checked="checked" /><label for="secondaryMaintain0" class="label">否</label>
			<input type="radio" id="secondaryMaintain1" name="secondaryMaintain" value="1" /><label for="secondaryMaintain1" class="label">是</label>
		</div>
	</div>
	
	<div class="group">
		<div class="label">备注:</div>
		<div class="item"><textarea id="remark" name="remark"></textarea></div>
	</div>
	<div class="buttons">
		<button class="highlight" id="submit1" type="button">确定</button>
		<button type="button" id="cancel1">取消</button>
		<input type="hidden" id="gardenid" name="gardenid" value="${gardenid }" />
	</div>
</div>
</form>
<%@ include file="/WEB-INF/sys/include/script.jsp" %>
<script type="text/javascript">
$(function() {
	$("#form").ligerForm({inputWidth: 300});
	
	verifyForm("form", {}, function(){
		$("#form").ajaxForm(function(data){
			UiUtil.isSuccess(data, "添加报修工单成功", function(){
				UiUtil.closeForm(true);
			});
		});
	});
	
	$("#submit1").click(function(){
		UiUtil.lockButton('submit1');
		$("#form").submit();
	});

	$("#cancel1").click(function(){
		UiUtil.closeForm();
	});
	
});
</script>
</body>
</html>